package cn.kgc.javaweb.service.impl;

import cn.kgc.javaweb.dao.UserDao;
import cn.kgc.javaweb.dao.impl.UserDaoImpl;
import cn.kgc.javaweb.service.UserService;

/**
 * @author: mosin
 * @version: v1.0  2023/2/1
 */
public class UserServiceImpl implements UserService {

    private UserDao userDao = new UserDaoImpl();  // 多态

    //private  UserDaoImpl UserDaoImpl  = new UserDaoImpl();
    //private  UserDaoImpl2 UserDaoImpl2  = new UserDaoImpl2();

    @Override
    public Boolean deleteById(Integer id) {  //jdbc  mysql
        Integer delete = userDao.delete(id);
        return delete>0;
    }
}
